﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using AffinityORMLibrary.DataLayer.Utility;

namespace AffinityORMLibrary.DataTypes
{
    public abstract class DataBase
    {
        private Dictionary<string, object> _oldKeys = new Dictionary<string, object>();
        public Dictionary<string, object> OldKeys
        {
            get { return _oldKeys; }
        }

        private List<SelectionComparerRow> _comparerRows = new List<SelectionComparerRow>();
        public List<SelectionComparerRow> ComparerRows
        {
            get { return _comparerRows; }
        }

        public void SetCriteria(PropertyInfo property, object val, SelectionCriteriaComparer c)
        {
            _comparerRows.Add(new SelectionComparerRow(property, val, c));
        }

        public void UpdateOldKey(string key, object value)
        {
            _oldKeys[key] = value;
        }
    }
}
